<?php

class Pwd extends Form {

    /**
     * Name of form template file
     * The name of actual template should be
     * set in sub-class
     *
     * @var string
     */
    protected $template = 'tplFormpwd';

    protected function init() {
        $Tr = $this->oRegistry->Tr;
        $this->addValidator('login', function($val) {

                    if (strlen($val) < 3) {
                        d('cp');

                        return 'Invalid. Please enter valid email or username';
                    }

                    return true;
                });

        $this->aVars['title'] = $Tr['Forgotten password'];
        $this->aVars['login_l'] = $Tr['Username OR Email Address'];
        $this->aVars['login_d'] = $Tr['forgot_help'];
        $this->aVars['submit'] = $Tr['Get Password'];
        $this->aVars['required'] = $Tr['Required field'];
    }

}